HP98x6 emulator v0.0

emulate 9816 (so no internal floppies and a non working serial interface ...)
        alpha 80x25 and graphics (400x300) with highlights (no blinking)
emulate 9836 (internal dual floppies, idprom)
        alpha 80x25 and graphics (512x390) with highlights (no blinking)

ram from 256k to 7,5m
bootrom 3.0 or 4.0

emulate an 98203 keyboard, the knob is the mouse wheel :) 

us and french Keymap 

PC          HP          HP(alt)
return      enter       execute
pause       pause       continue
escape      clr i/o 
end         run
home        clr->end    recall
scroll      prt all     graphics      CHANGED (was prt screen and not working))
insert      ins chr     ins ln
delete      del chr     del ln
f11         clr ln      edit
f12         result      alpha
`~          step                      (next to '1&'' in french keymap)
\ |         execute                   (no equivalent in french keymap)

on system
dual internal 9130 unit (264kb disk image, 9121 )

on internal hpib :

address 0: floppy : can use amigo like dual disks unit (9121, 9895) or ss80 dual 9122 unit  or 9133 hard disk unit
address 1: free (standard printer in pascal ...)
address 2: floppy : same as 0
address 3: hard disk actually only one 7908 16MB unit

9121(3"1/2): is 9890x(5"1/4) compatable: 1056 blocks of 256 bytes -> 264 kb disc image
9895(8"): 4500 blocks of 256 bytes -> 1125 kb disc image
9122(3"1/2)) type 0: ds 2464 blocks of 256 bytes -> 616kb disc image
             type 1: same as 0
             type 2: ds 1386 blocks of 512 bytes -> 693kb disc image
             type 3: ds 770 blocks of 1024 bytes -> 770kb disc image
             type 4: 9121 compatable
     
7908(winchester): 64750 blocks of 256 bytes

BOOT

choose mem size, one KML (either 9816 or 9836), keymap, disc at 700, disc at 702, disc at 703
choose rom version 3.0 or 4.0 (other don't works), keep hp date sync with pc, you can even accelerate your 68000 ...

launch :)

now load floppy images (be carefull to choose a compatable one with each unit, won't load if too small)
floppy image are loades in RAM, don't forget to save them before quitting the system (i'm not sure if it works ...)

hard disc image are direct access (no save needed)

then close 'debugger' window, emulation starts ...  

basic 5.1 works enough to be installed on the 7908 formatted as HFS ;)

pascal 3.2 still as some trouble with 7908 ???

if something isn't well emulated, please keep me informed (I don't have any HP98x6 system)

be carefull, old systems (basic 2,3 and hpl2) don't work with 'recent' discs unit (9122 and 7908, ss80 one's)
use either an 9836 with internal drive or use a 9121 unit with a 9816

on screen d700 is hpib disc 700,0
          d701 is hpib disc 700,1
          d710 is hpib disc 702,0
          d711 is hpib disc 702,1
          d720 is hpib disc 703,0
          d721 ... 723 don't work
          
SHIFT-PAUSE = reset isn't emulated (use on screen 'reset' hard 68000 reset)          

save features (except for hard disc) are not tested at all, be warned

Olivier De Smet

9-02-11

Some timing in HPIB parts corrected, now work with pascal 3.2
on screen d700 is hpib disc 700,0 ie in basic cat ":,700" or cat":,700,0"
          d701 is hpib disc 700,1 ie in basic cat ":700,1"
          d720 is hpib disc 702,0
          d721 is hpib disc 702,1
          d730 is hpib disc 703,0
          d740 ... 760 don't work

12-02-11

ss80 disc are ok now i think.
better amigo disc, good for basic, but pascal does strange access on them, need some more testing ...
better internal floppy

Hints:

9121, 9895 are dual amigo units
New amigo unit 9133
9133(winchester) is 'single' amigo unit but can be used as dual unit with basic, but pascal never look at the 2nd unit!

for units in pascal read carefully the doc:

when booting from floppies:
- first drive of boot unit is #3
- second drive of boot unit is #4
- if 702 is a floppy, first unit is #7
- if 702 is a floppy, second unit is #8
- if 700 is a floppy and 702 also, first unit is #9 otherwise #7
- if 700 is a floopy and 702 also, second unti is #10 otherwise #9

- hard disc are mounted on #11 up to #40 (number depends on type, size and ... so read the doc)

if pascal seem to loose some mounted disk,
 1- try 'Initialize' command
 2- if not succesfull, re execute table program from 'boot' disc
   'X' the 'BOOT:TABLE.', it's a feature !

Be carefull for disk image size and type:
any language can boot from ss80 unit, but some need to load a driver afterward to read it
 - for basic generally cs80 and hpib  with "load bin" from a supported drive (amigo or internal)
 - for pascal it's ok for 3.2 and 2.2 I think
 
 If you want to use an HFS filesystem on hard drive, read the doc (pascal or basic)

913x : 18848 blocks of 256 bytes 4712 kb image size
9895 : 4500 blocks of 256 bytes -> 1125 kb disc image
		 can load 616kb disc image (9122) but when you save it will be a
		 9895 image of 1125kb, be carefull
		 but it's usefull to convert a 9122 (SS80) image to a 9895 (amigo) one
		 
The disc images came from hpmuseum.net, just converted from td0 to dumb sector dumps

p325 (264kb) are 9121 format, 3"1/2 SS,SD (can be used on internal, 9121 (even 9895) and 9122 discs)
bas5 (616kb) are 9122 format 3"1/2 DD,DD (can be used only on 9122)

BASIC 5.1 is 3"1/2 DD,SD so use a 9122 unit or 9895
to boot basic 5, use bas5boot.bin image in a 9122 disc it load a rather complete rmb 5 with most drivers
if you want to make your own, start with bas5sys in a 9122 disc and follow the doc in
'BASIC5.1-InstallingAndMaintaining-98613-90042-424pages-Nov87' from hpmuseum

PASCAL 3.21 is 3"1/2 DD,DD so use 9122 unit or 9895
load 'p32boot' in the first unit of a 9122 or 9895
load 'p32access' in the second unit of a 9122 or 9895
start
when asked replace 'p32boot' with 'p32sysv', then 'X'

PASCAL 3.25 is 3"1/2 SD,SD so you can use any kind of floppy drive (internal, 9121, 9895 or 9122)
load '325boot' in the first unit of a 9122 or 9895
load '325access' in the second unit of a 9122 or 9895
start

HPL 2
can only be used from internal or amigo disc (9121 or 9895)

Save and load of system are now functionnal.


--

td2img python script is to convert TD0 disc images to .BIN one used by the emulator
you have to guess the right format of the TD0 image to save it as 9121 or 9122 types
for guessing, look at the sector map

--

21 02 11

9836C now functionnal, try STORM from bas5manx
9837H partially functionnal(ok with pascal, not ok with basic), still some scrolling troubles in pascal

Keyboard timers corrected (counting down instead of up)
Keymap for 'execute key' is really now '\' for us keyboard
Keymap change print screen -> scroll )

24 02 11

9837H now functionnal (thanks again Jon), choose a rom 4.0 for it
some 68000 optimizing
complete redraw of layout, now display kind of unit and lif name of volume on line
added a second hard disc unit as ss80 at 700,4 (usefull in basic) with "msi":,700,4" to access it

25 02 11

added 98635 float point card using intel pfu to emulate a National 16081 one
  speed up basic5.1 x3 and pascal3.0 x7 if real are used  -> check when 'new'
added a basic printer as file (name printer-xxx.txt) -> check when 'new'

As usual, changes makes old system saves obsolete

26 02 11

corrected cyclic timer (was not reload)
now save and load of system is working
some more bugs corrected

27 02 11

corrected some bugs for save and load of systems
Be carefull to type the complete path of the path of kml files the first type you choos a kml.
Don't leave the path empty !

